home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44b.zip / MSG002.QM < prev    next >
Text File  |  1992-06-22  |  14KB  |  285 lines

  1. *                               msg002.qm
  2. *    Macros To Format/Quote Message Reader Messages & Split Paragraphs
  3. *                        Written By Tom Hogshead
  4. *                       [ See MSGxx.QM For Use ]
  5. *                                 6/22/92
  6. *  Key     Subfile             Description
  7. * =====  ==========  =================================================
  8. *  @8                Format/Quote Message Retaining Sender Initials ( )  |chg
  9. *
  10. *     {e:\up\MSG??}  Return To MSGxx.QM
  11. *
  12. *-- eoi
  13.  
  14.  
  15. *                           M A C R O
  16. * -----------------------------------------------------------------------
  17. * @(8) Quote and Format Messages Retaining Sender Initials
  18. * ------- Ver 11a, 243 bytes Thu  06-18-1992  10:41:18 ------------------
  19. * This macro reformats any portion of an offline message reader message
  20. * while retaining sender initials "AB>" and quote character ">".
  21.  
  22. *  1) - Requires QEdit v2.15.
  23. *  2) - Macro execution speed on my 12 mhz AT is approximately 60 lps.
  24. *  3) - All message text of lines containing any type open or closed
  25. *       block marked *before* invoking this macro will be reformatted
  26. *       without pause.  If no block is marked before invoking, the
  27. *       macro pauses for the user to select the block end by cursoring
  28. *       down and pressing <enter>.
  29. *  4) - Character '>' in columns 1-16 MUST be quote character only.
  30. *  5) - Quote character must be '>' and MUST exist on quote line 1.
  31. *  6) - Ascii #173 must NOT exist in file.
  32. *  7) - Marked message is reformatted to a right margin of 60
  33. *       exclusive of sender initials and quote character.
  34. *  8) - Message text indention and outdention is maintained.
  35. *  9) - Multiple paragraphs may be quoted and formatted at same time.
  36. *  9a)- Different initials may be in front of first line of each
  37. *       paragraph.
  38. * 10) - Handles multiple initials like AB>CD>EF> up to column 15.
  39. * 11) - Operates irrespective of all toggles and qconfig settings.
  40. * 12) - Replaces "period space" with "period two spaces" in quote.
  41.  
  42. * OPTIONS--Macro may be modified to:
  43. * -----------------------------------
  44. *     - Have initials in front of quote line 1 only,           - Ver a
  45. *     - Add one extra space after the quote character ">" by
  46. *       uncommenting the commented 'shiftright' line.
  47.  
  48. *         ┌─ MUST be ">" unless macro is changed
  49. *         │┌─ #255, space or first letter of message text
  50. *         vv
  51. * JB>MC>MW> eeee eeee eeee eeee
  52.  
  53. * JB>MC>MW> aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
  54.  
  55. * JB>MC>       bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb
  56. * JB>MC>       bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb
  57. * JB>MC>       bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb
  58.  
  59. * JB>cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  60. * JB>cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  61. * JB>cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  62. * JB>cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  63. * JB>cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  64.  
  65. * JB>dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd
  66.  
  67.  
  68. * BECOMES THIS (with asterisks removed) ...
  69.  
  70. * JB>MC>MW> eeee eeee eeee eeee
  71.  
  72. * JB>MC>MW> aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
  73. *         > aaaa
  74.  
  75. * JB>MC>       bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb
  76. *      >       bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb
  77. *      >       bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb bbbb
  78. *      >       bbbb bbbb bbbb bbbb bbbb bbbb
  79.  
  80. * JB>cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  81. *   >cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  82. *   >cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  83. *   >cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  84. *   >cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  85. *   >cccc cccc cccc cccc cccc cccc cccc cccc cccc cccc
  86.  
  87. * JB>dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd dddd
  88. *   >dddd dddd
  89.  
  90. *--
  91. * Version 11a of @8: COMPLETE
  92. * -------------------------------
  93. @8      macrobegin onewindow savesettings setautoindentmode setsoundoff
  94.         setrmargin '60' return togglewordwrap
  95.         cursorright gotoblockend jtrue A markline gotoblockend jtrue OK
  96.         cursordown makectrofscreen pause jump B
  97.     A:  gotoblockbeg unmarkblock markline prevposition
  98.     B:  markline OK:
  99.         setscreenoff
  100.         addline prevpara endpara endline #173
  101.         gotoblockbeg insertline nextpara
  102.         findreplace #255 return ' ' return 'LN' return
  103.     LOOP:                                                                *|
  104.         gotocolumn '16' return      * Pos past initials
  105.         find
  106.             '>' return 'BL' return  * Test/move to last '>' in initials
  107.     jfalse NEXTPARA                 * Move to next para if no initials   *|
  108.     COPY_INITIALS:
  109.         unmarkblock markcolumn
  110.         begline                     * Finish marking initials
  111.         cut                         * Cut initial set to scrap
  112.         paste                       * Re-insert for single line test
  113.     USER_INITIALS:
  114.         endpara                                                          *|
  115.         begline
  116.         iscursorinblock
  117.     jfalse NOT_SINGLE_LINE          * Test true if single line
  118.         cut                         * Re-cut single line initials
  119.     jump MARK_BLOCK
  120.     NOT_SINGLE_LINE:
  121.         markcolumn
  122.         gotoblockbeg
  123.         deleteblock                 * Remove initials non-single line
  124.     MARK_BLOCK:
  125.         dropanchor
  126.         endpara dropanchor          * Mark para
  127.         gotoblockbeg                                                     *|
  128.     WRAP:
  129.         wrappara                    * Format para                        *|
  130.         gotoblockbeg
  131.         shiftright                  * Make single space for initials
  132. *       shiftright                  * Uncomment for extra space after '>'
  133.         cursorup
  134.         delline                     * Remove to add line at block begin
  135.         begline
  136.         unmarkblock markcolumn
  137.         endpara
  138.         begline                     * Finish single column block         *|
  139.         findreplace                 * Replace
  140.             ' ' return              * all spaces in block
  141.             delline paste return    * with initial set
  142.             'LNG' return
  143.         cursordown
  144.         dropanchor                  * Include blank line in block
  145.         gotoblockbeg
  146.     REPLACE_PERIOD:
  147.         findreplace '.' ' '   return '.' '  ' return 'LN' return
  148.         findreplace '.' '   ' return '.' '  ' return 'LN' return
  149.     * ---------------------------------------------------------------*
  150.     * - Un-Comment These Lines for Initials in Front of Para Line 1 Only --*
  151.     * -------------- Remove Initials Line 2 To End Para -------------*
  152.         gotocolumn return
  153.         find '>' return 'BL' return
  154.     jfalse NEXTPARA
  155.         cursorleft cursordown
  156.             cursorleft                                                   *:18
  157.             isbegline                                                    *:18
  158.             jtrue NEXTPARA          * True if single initial set         *:18
  159.             cursorright                                                  *:18
  160.         gotoblockend
  161.         prevposition
  162.         unmarkblock markcolumn
  163.         prevposition
  164.         begline
  165.         markcolumn                  * Close block to empty later         *:18
  166.             cursorup                                                     *:18
  167.             iscursorinblock                                              *:18
  168.             jtrue FILL              * False if single line to quote      *:18
  169.             gotoblockend            * Pos for nextpara                   *:18
  170.             jump NEXTPARA           * Bypass fill w/blanks               *:18
  171.     FILL:                                                                *:18
  172.         fillblock ' ' return        * Remove initials line 2 to end para
  173.     * ---------------------------------------------------------------------*
  174.     NEXTPARA:                                                            *|
  175.         nextpara                                                         *|
  176.         find #173 return delline return                                  *|
  177.     jfalse PAST_MARK                * False if all para's formatted      *|
  178.         prevposition                                                     *|
  179.         insertline cursordown       * Insert blank line above new para   *|
  180.         unmarkblock markline        * Mark first line to loop again      *|
  181.     jump LOOP                                                            *|
  182.     PAST_MARK:                                                           *|
  183.         find return 'G' return      * Move to marker                     *|
  184.         delch                       * Delete marker                      *|
  185.         cursordown
  186.         delline                     * Delete added line at end of msg
  187.         begline
  188.         makectrofscreen
  189.         unmarkblock
  190.         setrmargin '72' return      * Re-set rt margin
  191.         restoresettings
  192. *
  193. * 231 bytes Thu  12-19-1991  23:46:33 (TH @6)
  194. * 222 bytes Sat  12-21-1991  12:07:31 (TH @8, to ALL #3/798,  Ver #1)
  195. * 206 bytes Sun  12-22-1991  10:41:19 (TH @8, to JB #23/1217, Ver #2)
  196. * 211 bytes Tue  12-24-1991  12:12:00 (TH @8, to ALL, #3/800, Ver #3)
  197. * 204 bytes Thu  12-26-1991  11:22:13 (TH @8, for all cases,  Ver #4)
  198. * 230 bytes Thu  12-26-1991  12:14:19 (TH @8, to JM #23/1219  Ver #4a)
  199. * 203 bytes Fri  12-27-1991  15:48:29 (TH @8, chgd to dropanchor, Ver 5)
  200. * 203 bytes Fri  12-27-1991  15:48:29 (TH @8, to ST & MHa, #20/108, Ver 5)
  201. * 152 bytes Sun  12-29-1991  11:10:47 (TH @8, Ver 6c bare bones)
  202. * 192 bytes Sun  12-29-1991  11:08:54 (TH @8, chg'd addlines, Ver 6 )
  203. * 218 bytes Sun  12-29-1991  11:12:54 (TH @8, Ver 6a)
  204. * 192 bytes Sun  12-29-1991  11:08:54 (TH @8, to JB  #23/1221 12/30, Ver 6)
  205. * 192 bytes Sun  12-29-1991  11:08:54 (TH @8, to ALL  #3/801  12/30, Ver 6)
  206. * 192 bytes Sun  12-29-1991  11:08:54 (TH @8, to MH  #20/155,   1/3, Ver 6)
  207. * 192 bytes Sun  12-29-1991  11:08:54 (TH @8, to KB  #21/4979, 1/23, Ver 6)
  208. * 151 bytes Sun  01-26-1992  17:30:30 (TH @8, Ver 7c, bare bones)
  209. * 191 bytes Sun  01-26-1992  17:23:54 (TH @8, ver 7, removed 2 addlines)
  210. *                   (In Amac42.zip)
  211. * 253 bytes Thu  03-26-1992  08:51:26 (TH @8, Ver 8ab, no line on top/bot)
  212. * 194 bytes Thu  03-26-1992  08:58:11 (TH @8, to RO #23/1407, Ver 8.56)
  213. * 194 bytes Thu  03-26-1992  08:58:11 (TH @8, Ver 8)
  214. * 220 bytes Thu  03-26-1992  09:07:55 (TH @8, Ver 8a)
  215. *                   (In Amac42d.zip)
  216. * 219 bytes Sat  05-16-1992  11:38:54 (TH @8, Ver 9,  ins user select inits)
  217. * 245 bytes Sat  05-16-1992  11:24:23 (TH @8, Ver 9a, ins user select inits)
  218. * 245 bytes Sat  05-16-1992  11:24:23 (TH @8, Ver 9a,  to ALL #3/847, 5/16)
  219. *                   (In Amac43.zip)
  220. * 201 bytes Sat  06-13-1992  09:15:24 (TH @8 ver 10 diff inits in para's ok)
  221. * 201 bytes Sat  06-13-1992  09:15:24 (TH @8 ver 10 to SM #21/5338 as @f2)
  222. * 227 bytes Sat  06-13-1992  09:14:51 (TH @8 ver 10a *|)
  223. * 201 bytes Thu  06-18-1992  12:47:33 (TH @8 ver 11 same as ver 10)
  224. * 243 bytes Thu  06-18-1992  10:41:18 (TH @8, corrected for single lines *:18)
  225. * 243 bytes Thu  06-18-1992  10:41:18 (TH @8 ver 11a)
  226.  
  227.  
  228.  
  229.  
  230. * 
  231. * Version 11 of @8: Commented lines removed (same as ver 10)
  232. * ------------------------------------------------------------
  233. * @8      macrobegin onewindow savesettings setautoindentmode setsoundoff
  234. *       setrmargin "60" return togglewordwrap
  235. *       cursorright gotoblockend jtrue A markline gotoblockend jtrue OK
  236. *       cursordown makectrofscreen pause jump B
  237. *   A:  gotoblockbeg unmarkblock markline prevposition
  238. *   B:  markline OK:
  239. *       setscreenoff
  240. *       addline prevpara endpara endline #173
  241. *       gotoblockbeg insertline nextpara
  242. *       findreplace #255 return " " return "LN" return
  243. *   LOOP:                                                                *|
  244. *       gotocolumn "16" return
  245. *       find ">" return "bl" return
  246. *   jfalse NEXTPARA                                                      *|
  247. *   COPY_INITIALS:
  248. *       unmarkblock markcolumn begline cut paste
  249. *       endpara                                                          *|
  250. *       begline iscursorinblock jfalse NOT_SINGLE_LINE
  251. *       cut
  252. *   jump MARK_BLOCK
  253. *   NOT_SINGLE_LINE:
  254. *       markcolumn gotoblockbeg deleteblock
  255. *   MARK_BLOCK:
  256. *       dropanchor endpara    dropanchor gotoblockbeg                    *|
  257. *   WRAP:
  258. *       wrappara                                                         *|
  259. *       gotoblockbeg shiftright
  260. * *     shiftright      * Uncomment this line for one extra space after ">"
  261. *       CURSORUP DELLINE* Remove line to add line at block begin
  262. *       begline unmarkblock markcolumn endpara begline                   *|
  263. *       findreplace " " return delline paste return "LNG" return
  264. *       cursordown dropanchor gotoblockbeg
  265. *   REPLACE_PERIOD:
  266. *       findreplace "." " "   return "." "  " return "LN" return
  267. *       findreplace "." "   " return "." "  " return "LN" return
  268. *   NEXTPARA:                                                            *|
  269. *       nextpara                                                         *|
  270. *       find #173 return delline return                                  *|
  271. *   jfalse PAST_MARK                                                     *|
  272. *       prevposition                                                     *|
  273. *       insertline cursordown                                            *|
  274. *       unmarkblock markline                                             *|
  275. *   jump LOOP:                                                           *|
  276. *   PAST_MARK:                                                           *|
  277. *       find return "g" return delch cursordown begline                  *|
  278. *       DELLINE
  279. *       makectrofscreen unmarkblock setrmargin "72" return restoresettings
  280. * *
  281. * * 194 bytes Thu  03-26-1992  08:58:11 (TH @8, ver 8)
  282. * * 201 bytes Sat  06-13-1992  09:15:24 (TH @f2 ver 10 to SM #21/5338 as @f2)
  283. * * 201 bytes Thu  06-18-1992  12:47:33 (TH @8 ver 11 same as ver 10)
  284.  
  285.